home *** CD-ROM | disk | FTP | other *** search
-
- We have added a facility for determining the proportional amount of
- time spent executing compiled lisp defined functions, as well as
- internal c defined functions.
-
- This system works under Unix BSD or System V.
-
- To use this code load the file lsp/profile.o.
-
- SET-UP-PROFILE &optional (array-size 100000)(max-funs 6000)
-
-
- must be called to allocate space for storing the profile information
- as it is collected, and also to build a list of the functions from
- the symbol table of the executable (defaults to "saved_kcl").
-
- Once this has been done a call to
-
- PROF (start scale)
-
- START will correspond to the beginning of the profile array, and
- the SCALE will mean that 256 bytes of code correspond to SCALE bytes in the
- profile array.
-
- Thus if the profile array is 1,000,000 bytes long and the code segment is
- 5 megabytes long you can profile the whole thing using a scale of 50
- Note that long runs may result in overflow, and so an understating of the
- time in a function.
-
- With a scale of 128 a sample loop overflowed some slots at 6,000,000
- times through the loop.
-
- There is very little slowdown in execution during profiling. No special
- compilation is necessary.
-
- To display the result do
-
- (si::display-profile)
-
- To turn off profiling use (si::prof 0 0).
-
- (si::clear-profile)
- clears the profile array for a new run.
-
-
-